home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1991 March / 64er_Magazin_91-03_1991_Markt__Technik_de_Side_B.d64 / highspeed c128.a < prev    next >
Text File  |  2022-10-26  |  5KB  |  74 lines

  1.  
  2.  
  3. ready.
  4. 0000 ;*******************                                                      
  5. 0001 ;* highspeed c128  *                                                      
  6. 0002 ;* quellcode       *                                                      
  7. 0003 ;* written in 1990 *                                                      
  8. 0004 ;* by lars werner  *                                                      
  9. 0005 ;*******************                                                      
  10. 0006 ;                                                                         
  11. 0007                 *=    $10a6                                               
  12. 0008                 .bank $0f                                                 
  13. 0009                 .obj  m                                                   
  14. 0010 ;                                                                         
  15. 0011  rando          =     50                                                  
  16. 0012  randu          =     250                                                 
  17. 0013  raster         =     $d012                                               
  18. 0014  mask           =     $d01a                                               
  19. 0015  request        =     $d019                                               
  20. 0016  ciarequest     =     $dc0d                                               
  21. 0017 ;                                                                         
  22. 0018                 sei                                                       
  23. 0019                 lda   $0314       ;alten irq                              
  24. 0020                 ldx   $0315       ;merken                                 
  25. 0021                 sta   irqalt                                              
  26. 0022                 stx   irqalt+1                                            
  27. 0023 ;                                                                         
  28. 0024                 lda   #<irqneu    ;neuen irq                              
  29. 0025                 ldx   #>irqneu    ;setzen                                 
  30. 0026                 sta   $0314                                               
  31. 0027                 stx   $0315                                               
  32. 0028 ;                                                                         
  33. 0029                 lda   #rando      ;rasterzeilen-irq                       
  34. 0030                 sta   raster      ;setzen                                 
  35. 0031                 lda   raster-1                                            
  36. 0032                 and   #%01111111                                          
  37. 0033                 sta   raster-1                                            
  38. 0034                 lda   #%10000001                                          
  39. 0035                 sta   mask                                                
  40. 0036                 cli                                                       
  41. 0037                 rts                                                       
  42. 0038 ;                                                                         
  43. 0039  irqneu         lda   request     ;raster-irq-register                    
  44. 0040                 sta   request     ;loeschen                               
  45. 0041                 bmi   rasterirq   ;auf timer-irq pruefen                  
  46. 0042 ;                                      ;wenn aktiv =>rasterirq            
  47. 0043 ;                                                                         
  48. 0044  timerirq       lda   ciarequest  ;timer-irq-register loeschen            
  49. 0045                 cli                                                       
  50. 0046                 jmp   (irqalt)    ;sprung zum timer-irq                   
  51. 0047 ;                                                                         
  52. 0048  rasterirq      lda   raster      ;rasterzeile holen                      
  53. 0049                 cmp   #randu      ;unterer bildschirmrand ?               
  54. 0050                 bcs   ok          ;wenn erreicht sprung => ok             
  55. 0051 ;                                                                         
  56. 0052                 lda   #252        ;taktfrequenz auf                       
  57. 0053                 sta   $d030       ;1 mhz setzen                           
  58. 0054                 lda   #randu      ;neue rasterzeile holen                 
  59. 0055                 jmp   exit        ;irq verlassen                          
  60. 0056 ;                                                                         
  61. 0057  ok             lda   #253        ;taktfrequenz auf                       
  62. 0058                 sta   $d030       ;2 mhz setzen                           
  63. 0059                 lda   #rando      ;neue rasterzeile holen                 
  64. 0060 ;                                                                         
  65. 0061  exit           sta   raster      ;neue rasterzeile setzen                
  66. 0062                 jmp   (irqalt)    ;irq verlassen                          
  67. 0063 ;                                                                         
  68. 0064  irqalt         .byte $00,$00                                             
  69. 0065 ;                                                                         
  70. 0066                 .end                                                      
  71. 0067                                                                           
  72.  
  73. ready.
  74.